// 封装一个函数:获取一个结果,判断当前是早上还是下午或者晚上
export const getTime = () => {
  //通过内部构造函数Date
  let message = "";
  const hours = new Date().getHours();
  if (hours <= 9) {
    message = "早上";
  } else if (hours <= 14) {
    message = "上午";
  } else if (hours <= 18) {
    message = "下午";
  } else {
    message = "晚上";
  }
  return message;
};
